<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.3.1.min.js"></script>

</head>
<body>
<button type="button" name="button">点击变色</button>
<ul>
    <li>php1</li>
    <li>php2</li>
    <li>php3</li>
    <li>php4</li>
    <li>php5</li>
</ul>
</body>
<script>
    $(function () {
        // console.log('长度是'+$('li').length)
        // console.log('选择符是'+$('li').selector)
        // console.log('上下文属性是'+$('li').content)
        // console.log('版本号属性是'+$('li').jquery)

        $('button').click(function () {
            // $('li').css('color','red')
            $('li').each(function (i) {//i是索引，this默认传入
                $(this).css('color','red').html(i+'----www.php.cn')
            })
            
        })

    })
</script>
</html>